-- GENERATED SPELL FOR [Captain Emmy Malin] --


function spell0_26762(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_26762', 8330, 1)
end

function spell1_26762(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26762', 7000, 1)
end

function spell2_26762(pUnit, Event) --@Ice Lance,n/a--
pUnit:FullCastSpellOnTarget(49906,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26762', 544, 1)
end

function Sorts_26762(pUnit, Event)
local choix_sorts_26762 = math.random(0, 2)
if choix_sorts_26762 == 0 then
pUnit:RegisterEvent('spell0_26762', 1, 1)
end
if choix_sorts_26762 == 1 then
pUnit:RegisterEvent('spell1_26762', 1, 1)
end
if choix_sorts_26762 == 2 then
pUnit:RegisterEvent('spell2_26762', 1, 1)
end
end

function mob26762_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26762', math.random(1500, 3000), 1)
end

function mob26762_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26762_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26762_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26762, 1, 'mob26762_Action')
RegisterUnitEvent(26762, 2, 'mob26762_Leave')
RegisterUnitEvent(26762, 3, 'mob26762_Kill')
RegisterUnitEvent(26762, 4, 'mob26762_Die')
